layui.use(function () {
    let form = layui.form;
    let table = layui.table;
    let $ = layui.jquery;
    let layer = layui.layer;

    table.render({
        elem: '#historical_event',
        url: '/reality/findReality',
        page: true,
        height: '500px',
        cols: [
            [
                {
                    field: 'destroyerId',
                    title: "驱逐舰编号",
                    align: 'center',
                    sort: true
                },
                {
                    field: 'moment',
                    title: "时刻",
                    align: 'center',
                },
                {
                    field: 'longitude',
                    title: "经度",
                    align: 'center'
                },
                {
                    field: 'latitude',
                    title: "纬度",
                    align: 'center'
                },
                {
                    field: 'eventType',
                    title: '事件类型',
                    align: "center"
                },
                {
                    field: 'grade',
                    title: "战略等级",
                    align: 'center'
                },
                {
                    field: 'commander',
                    title: "指挥员",
                    align: 'center'
                },
                {
                    field: 'name',
                    title: "姓名",
                    align: 'center'
                },
                {
                    field: 'affiliationNumber',
                    title: "所属舰艇编号",
                    align: 'center'
                },
                {
                    field: 'number',
                    title: "任数",
                    align: 'center'
                },
                {
                    field: 'takeOfficeTime',
                    title: "上任时间",
                    align: 'center'
                },
            ]
        ],
        limits: [1, 3, 5, 7, 9],
        limit: 3,
        done: function (res, curr, count) {
            $("[lay-id='historical_event']>.layui-table-page").css({
                "text-align": "center"
            });
        }
    });

});